const path = require('path');
const fs = require('fs-extra');

function loadContent (file = '') {
  const alpha = path.resolve(process.cwd(), file);
  if (fs.existsSync(alpha) && alpha.endsWith('.json')) {
    return require(alpha);
  }
}

module.exports = loadContent;
